@@ -57,6 +57,7 @@ def get_point_info(request): |
||
57 | 57 |
|
58 | 58 |
@logit |
59 | 59 |
def get_point_fields(request): |
60 |
+ user_id = request.POST.get('user_id', '') |
|
60 | 61 |
point_id = request.POST.get('point_id', '') |
61 | 62 |
|
62 | 63 |
try: |
@@ -64,8 +65,16 @@ def get_point_fields(request): |
||
64 | 65 |
except IsolationPointInfo.DoesNotExist: |
65 | 66 |
return response(IsolationPointStatusCode.ISOLATIONPOINT_NOT_FOUND) |
66 | 67 |
|
68 |
+ try: |
|
69 |
+ user_info = IsolationPointUserInfo.objects.get(user_id=user_id, point_id=point_id, status=True) |
|
70 |
+ user_info = user_info.fields |
|
71 |
+ except IsolationPointUserInfo.DoesNotExist: |
|
72 |
+ user_info = [] |
|
73 |
+ |
|
67 | 74 |
return response(data={ |
75 |
+ 'point_name': point.point_name, |
|
68 | 76 |
'fields': point.point_fields, |
77 |
+ 'user_info': user_info, |
|
69 | 78 |
}) |
70 | 79 |
|
71 | 80 |
|